<?php
if (!init()) {
  redirect('?action=login');
}

$resultSet = deleteDialog($_GET['did']);
$initiatorAction = \controller\ControllerUtil::getEncodedActionFromUrlWithParameters($_SERVER['HTTP_REFERER']);

if ($resultSet) {
  redirect("?action=msg&header=header.dialog.delete.success&body=body.dialog.delete.success&view=" . $initiatorAction);
} else {
  redirect("?action=msg&header=header.dialog.delete.failed&body=body.dialog.delete.failed&view=" . $initiatorAction);
}
